package com.ohos.connect.devicecloud.auth.modular.login.service;

import com.ohos.connect.devicecloud.auth.core.pojo.SaBaseClientLoginUser;
import com.ohos.connect.devicecloud.auth.core.pojo.SaBaseLoginUser;
import com.ohos.connect.devicecloud.auth.modular.login.model.dto.AuthAppPwdDTO;
import com.ohos.connect.devicecloud.auth.modular.login.model.dto.AuthPhoneValidCodeLoginDTO;
import com.ohos.connect.devicecloud.auth.modular.login.model.dto.PhoneValidCodeQueryDTO;
import com.ohos.connect.devicecloud.auth.modular.login.model.dto.ValidPhoneCodeDTO;
import com.ohos.connect.devicecloud.auth.modular.login.model.vo.*;
import com.ohos.connect.devicecloud.auth.modular.login.result.AuthPicValidCodeResult;

/**
 * 登录Service接口
  * 
 */
public interface AuthService {

    /**
     * 获取图片验证码
     *
     * 
     **/
    AuthPicValidCodeResult getPicCaptcha(String type);

    /**
     * 根据图片验证码获取手机验证码
     *
     *
     * 
     **/
    String getPhoneValidCodeByPicCaptcha(AuthGetPhoneValidCodeParam authGetPhoneValidCodeParam, String type);

    /**
     * 获取手机验证码
     *
     *
     * 
     **/
    ValidCodeReqNoVO getPhoneValidCode(PhoneValidCodeQueryDTO phoneValidCodeQueryDTO, String type);

    /**
     * 获取邮箱验证码
     *
     *
     * 
     **/
    ValidCodeReqNoVO getEmailValidCode(String email, String type);

    /**
     * 校验手机验证码
     *
     *
     * 
     **/
    void validPhoneCode(ValidPhoneCodeDTO validPhoneCodeDTO);

    /**
     * 账号密码登录
     *
     *  
     * 
     **/
    AuthAppLoginVO doLogin(AuthAppPwdDTO authAppPwdDTO, String type);

    /**
     * 手机验证码登录
     *
     *  
     * 
     **/
    String doLoginByPhone(AuthPhoneValidCodeLoginDTO authPhoneValidCodeLoginDTO, String type);

    /**
     * 获取B端登录用户信息
     *
     *  
     * 
     **/
    SaBaseLoginUser getLoginUser();

    /**
     * 获取APP登录用户信息
     *
     *  
     * 
     **/
    SaBaseClientLoginUser getClientLoginUser();

    /**
     * 根据用户id和客户端类型登录，用于第三方登录
     *
     *  
     * 
     */
    String doLoginById(String userId, String device, String type);

    void doLogout(String device);


}
